﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebApp.App.Models.BLL.Cms
{
    public class SysConfig
    {
        public Dictionary<string, string> GetConfigs()
        {
            var con = Models.Common.OpenConnection();
            var cfs = con.QueryAll("select name,value from sys_config");
            Dictionary<string, string> configs = new Dictionary<string, string>();
            foreach (var cf in cfs)
            {
                configs.Add(cf.name, cf.value);
            }
            con.Close();
            return configs;
        }
    }
}